import request from '@/utils/request'

// 查询水表列表
export function listWater(query) {
  return request({
    url: '/device/water/list',
    method: 'get',
    params: query
  })
}

// 查询水表详细
export function getWater(id) {
  return request({
    url: '/device/water/' + id,
    method: 'get'
  })
}

// 新增水表
export function addWaterDevice(data) {
  return request({
    url: '/device/water/add',
    method: 'post',
    data: data
  })
}

// 修改水表
export function updateWater(data) {
  return request({
    url: '/device/water/edit',
    method: 'put',
    data: data
  })
}

// 删除水表
export function delWater(id) {
  return request({
    url: '/device/water/' + id,
    method: 'delete'
  })
}

// 导出水表
export function exportWater(query) {
  return request({
    url: '/device/water/export',
    method: 'get',
    params: query
  })
}

//设备类型
export function getDevices(query) {
  return request({
    url: '/device/getDevices',
    method: 'get',
    params: query
  })
}
